/*
 * @Author: c
 * @Date: 2023-11-24 08:51:46
 * @LastEditTime: 2024-01-03 20:38:52
 * @LastEditors: c
 * @Description: 
 * @FilePath: \music-web-backend\src\app.controller.ts
 * https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Body, Controller, Get,HostParam, Post } from '@nestjs/common';
import { AppService } from './app.service';
import { UserForm } from './core/system/user/dto/create-user.dto';


@Controller()
export class AppController {
  constructor(private readonly appService: AppService) { }

  @Get()
  getHello(): string {
    debugger
    return this.appService.getHello();
  }

  @Post()
  saveHello(@Body() userForm: UserForm ): string {
    debugger
    return this.appService.getHello();
  }
}


//限制域名（只有在此域名下才能访问）
@Controller({ host: ':account.example.com' })
export class AccountController {
  @Get()
  getInfo(@HostParam('account') account: string) {
    debugger
    return account;
  }
}